#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QTableWidgetItem>
#include "adddevicewidget.h"

namespace Ui {
class MainWidget;
}

class MainWidget : public QWidget
{
    Q_OBJECT

public:
    explicit MainWidget(QWidget *parent = nullptr);
    ~MainWidget();
    void show(QString userid);

private slots:
    void on_tableWidget_cellDoubleClicked(int row, int column);

    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_3_clicked();

    void on_tableWidget_2_cellDoubleClicked(int row, int column);
    void on_pushButton_5_clicked();

public slots:
    void onDevListRet(const bool& ret,QVector<QVector<QString>> & tableData);
    void onDevDelRet(const bool& ret,const QString& msg);
    void onStartCameraRet(const bool& ret,const QString& msg);
    void onStopCameralRet(const bool& ret,const QString& msg);
    void onVideoRecv(const QPixmap& pic);
private:
    Ui::MainWidget *ui;
    QString userid;
    QVector<QVector<QString>> tableDatas_;
    void refreshTableUI();
};

#endif // MAINWIDGET_H
